arithmetic means and nth term of an arithmetic sequence